import Vue from 'vue'
import App from './App.vue'
import router from './router'

//按需导入mint-ui组件
import MintUI from "mint-ui"
Vue.use(MintUI)
import "mint-ui/lib/style.css"
Vue.prototype.MintUI = MintUI

// 导入mui样式
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
// 导入mui的js
import mui from "./lib/mui/js/mui.min"
Vue.prototype.mui = mui

// 导入 axios
import axios from 'axios'
Vue.prototype.$ajax = axios

import VuePreview from "vue-preview";
Vue.use(VuePreview);

// 设置请求根域名
axios.defaults.baseURL = "http://www.lovegf.cn:8899"

// 集成flexible.js 处理移动端适配
import "lib-flexible/flexible.js"

// 格式化时间插件
// 导入格式化时间的插件
import moment from 'moment'

// 导入vuex
import store from "./store/index.js"


// 定义全局的过滤器
Vue.filter('dateFormat', function (dataStr, pattern = "YYYY-MM-DD HH:mm:ss") {
  return moment(dataStr).format(pattern)
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
  store:store
}).$mount('#app')
